package com.hyt.it.ogt.ks.feign.model;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

import javax.validation.Valid;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hyt.common.apiInfor.DataType;
import com.hyt.core.ModelSerializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * <p>
 * ExamCandidate 类型:
 * </p>
 *
 * @author linjd
 * @since 2020/6/16 18:12
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "考试考生", description = "考试考生")
public class ExamCandidate implements ModelSerializable {

    private static final long serialVersionUID = -8679190690542692609L;
    @ApiModelProperty(value = "id")
    private String id;

    @ApiModelProperty(value = "考试ID")
    private String examId;

    @ApiModelProperty(value = "试卷ID")
    private String paperId;

    @ApiModelProperty(value = "是否自定义准考证，1表示是，0表示否")
    private Boolean selfDefineAdmission;

    @ApiModelProperty(value = "准考证号")
    private String admissionNumber;

    @ApiModelProperty(value = "是否已发送邮件，1 表示是，0 表示否")
    private Boolean sendEmail;

    @ApiModelProperty(value = "是否发送短信，1 表示是，0 表示否")
    private Boolean sendMessage;

    @ApiModelProperty(value = "是否强制收卷，1表示是，0表示否")
    private Boolean forbidEndExam;

    @ApiModelProperty(value = "判分状态，1已判分，0待判分")
    private Boolean judgeScoreState;

    @ApiModelProperty(value = "撤销交卷，1表示是，0表示否")
    private Boolean cancelFinishExamState;

    /**
     * 枚举类：CandidateStatusCode
     */
    @ApiModelProperty(value = " 考生状态,0未开考，10：已登录；20：已开考；21:中断；30：已交卷/已完成；40：缺考；50：因故未完成")
    private Integer state;

    @ApiModelProperty(value = "客观题总分数")
    private BigDecimal objectiveScore;

    @ApiModelProperty(value = "主观题总分数")
    private BigDecimal subjectiveScore;

    @ApiModelProperty(value = "考生考试实际开始时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss" , timezone="GMT+8")
    private LocalDateTime examBeginDate;

    @ApiModelProperty(value = "考生考试实际结束时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss" , timezone="GMT+8")
    private LocalDateTime examEndDate;

    @ApiModelProperty(value = "剩余时长")
    private Integer remainderDate;

    @ApiModelProperty(value = "试卷题目数量")
    private Integer paperQuestionNumber;

    @ApiModelProperty(value = "考生已作答题目数量")
    private Integer candidateAnswerNumber;

    @ApiModelProperty(value = "考生登录时间")
    private LocalDateTime loginTime;

    @ApiModelProperty(value = "考生登录IP地址")
    private String loginIp;

    @ApiModelProperty(value = "考生登录地址，比如广东省深圳市")
    private String loginAddress;

    @ApiModelProperty(value = "机构ID")
    private String officeId;

    @ApiModelProperty(value = "科目ID")
    private String subjectId;

    @Valid
    @ApiModelProperty(value = "考生字段内容", dataType= DataType.ARRAY)
    private List<ExamCandidateInfo> examCandidateInfos;

    @ApiModelProperty(value = "是否备份1：是 0：否")
    private Integer isBackup;

    @ApiModelProperty(value = "姓名")
    private String name;

    @ApiModelProperty(value = "手机号")
    private String phone;

    @ApiModelProperty(value = "身份证")
    private String cardNumber;

}
